package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-05-19
 * Time: 18:59
 */
public class BookList {
    private Book[] books = new Book[10];
    private int usedSize;

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public Book getBook(int index){
        return books[index];
    }

    public void setBook(int index,Book book){
        books[index] = book;
    }

    public BookList(){
        books[0] = new Book("西游记","罗贯中",50,"小说");
        books[1] = new Book("三国演义","吴承恩",70,"小说");
        books[2] = new Book("红楼梦","曹雪芹",80,"小说");
        books[3] = new Book("水浒传","施耐庵",60,"小说");
        usedSize = 4;
    }
}
